#ifndef THREAD_EXCEPTION_H
#define THREAD_EXCEPTION_H

#include "utility/Copyable.h"

#include <exception>
#include <string>

class Exception : public std::exception
{
public:
    explicit Exception(std::string message, bool demangle = true) noexcept;
    virtual ~Exception() noexcept override;

    COPYABLE(Exception);

    virtual const char *what() const noexcept {
        return _message.c_str();
    }
    const char *stack_trace() const noexcept {
        return _stackTrace.c_str();
    }


private:
    std::string _message;
    std::string _stackTrace;
};




#endif